package com.eddie.auction.config;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author Eddie
 * @date 2022/08/01 13:39
 **/
public class ConfigManager {
    private ConfigManager() {

    }

    private static final Properties properties;

    static {
        InputStream resourceAsStream = ConfigManager.class.getClassLoader().getResourceAsStream("/jdbc.properties");
        properties = new Properties();
        try {
            properties.load(resourceAsStream);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public static String getProperty(String key) {
        return properties.getProperty(key);
    }

}
